'use strict';

const Controller = require('../../core/common');

class RecordsController extends Controller {

  async index() {
    const { ctx } = this;

    const data = await ctx.service.v1.records.findAll();

    this.success(data);
  }

  async show() {

    const { ctx } = this;

    const data = await ctx.service.v1.records.findAll();

    this.success(data);

  }

  async create() {

    const { ctx } = this;

    const data = await ctx.service.v1.records.create(ctx.request.body);

    this.success(data);

  }

}

module.exports = RecordsController;